package com.youlu.campus.admin.dict;

import com.youlu.campus.common.base.RestResult;
import com.youlu.campus.common.base.RestResultBuilder;
import com.youlu.campus.service.dict.DictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DictController {

    @Autowired
   private DictService dictService;

    @GetMapping("/dict")
    public RestResult findByType(@RequestParam("type") String type){
        return RestResultBuilder.builder().success().data(dictService.getByType(type)).build();
    }
}
